package com.gen.method;

import java.util.List;

import com.framework.tools.DJTypeMapper;
import com.framework.util.ClassUtils;

import freemarker.template.SimpleScalar;
import freemarker.template.TemplateMethodModel;
import freemarker.template.TemplateModelException;

public class GetQualifiedNameMethodModel implements TemplateMethodModel {
	@SuppressWarnings("rawtypes")
	public Object exec(List arguments) throws TemplateModelException {
		if (arguments.size() != 3) {
			throw new TemplateModelException("Wrong arguments");
		}
		return new SimpleScalar(ClassUtils.getQualifiedName(DJTypeMapper.getJStr(
				Integer.parseInt((String) arguments.get(0)),
				Integer.parseInt((String) arguments.get(1)),
				Integer.parseInt((String) arguments.get(2))))).toString();
	}
}